{% extends 'management.html' %}
{% load i18n %}

{% block content %}
  <div id="detail">
    <h4>
        <a href="/admin/upload/">{% trans 'Upload' %}</a>
    </h4>          

    {% for file in data %}
      <div class="post">
        <h1><a href="/main/file/?id={{file.key.id}}">
	          {{file.name}}
	        </a>
        </h1>
        <h5>
          {{file.createTime|date:"Y-m-d H:i:s"}}&nbsp;&nbsp;
          {% trans "Category" %}:<a href="/main/downloads/?category={{file.jumCategory.key.id}}">{{file.jumCategory.name}}</a>
          &nbsp;&nbsp;
          {% trans "Comments" %}:{{file.filecomment_set.count}}&nbsp;&nbsp;
          </h5>
        <p>{{file.describe}}</p>
        <h4>
            <a href="/main/download/?id={{file.key.id}}" >
              {% trans 'Download' %}
            </a>
              &nbsp;&nbsp;
            <a href="/admin/editfile/?id={{file.key.id}}">{% trans 'Edit' %}</a>
              &nbsp;&nbsp;
            <a href="/admin/deletefile/?id={{file.key.id}}" onClick="return confirm('{% trans "Are you sure?" %}')">
              {% trans 'Delete' %}
            </a>
          </h4>
      </div>
    {% endfor %}
  </div>
{% endblock content %}